package homework;

public class reverseSort {
	public static void main(String[] args) {
		int[] array = {15,4,47,75,23,61,78,95,0};
		if (array.length % 2 ==1) {
			for (int i = 0; i < (array.length / 2); i++) {
				int temp = array[array.length-1-i];
				array[array.length-1-i] = array[i];
				array[i] = temp;
			}
		}else if (array.length % 2 == 0) {
			for (int i = 0; i < (array.length / 2) - 1; i++) {
				int temp = array[array.length-1-i];
				array[array.length-1-i] = array[i];
				array[i] = temp;
			}
		}
		for (int i = 0; i < array.length; i++) {
			System.out.println(array[i]);
		}
	}
}
